package com.atguigu.tingshu.common.threadpool;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.concurrent.TimeUnit;

/**
 * @Author：yyj
 * @Package：com.atguigu.tingshu.common.threadpool
 * @Project：tingshu_parent240829
 * @name：ThreadProperties
 * @Date：2025/2/6 21:20
 * @Filename：ThreadProperties
 */
@ConfigurationProperties(prefix = "thread.pool")
@Data
public class ThreadProperties {
    private int corePoolSize = Runtime.getRuntime().availableProcessors() * 2;

    private int maximumPoolSize = 2 * corePoolSize;

    private int blockQueueSize = 1000;
    private long ttl = 30;
    private TimeUnit unit = TimeUnit.SECONDS;
}